package EachRegionLoanstopeople;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class EachRegionLoanstopeopleMapper extends Mapper<LongWritable, Text, Text, IntWritable> {
    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
        //拿到一行文本内容，转换成String 类型
        //将这行文本切分成单词
        String[] splits = value.toString().split(",");
        String region=splits[16];
        String num = splits[0];
        int number = new Integer(num);



        context.write(new Text(region), new IntWritable(1));


    }
}
